﻿using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Collections;
using System.Drawing;
using System.Linq;
using System.Workflow.ComponentModel.Compiler;
using System.Workflow.ComponentModel.Serialization;
using System.Workflow.ComponentModel;
using System.Workflow.ComponentModel.Design;
using System.Workflow.Runtime;
using System.Workflow.Activities;
using System.Workflow.Activities.Rules;
using BPM.Base.WFLib.CustomerAttribute;
using BPM.Foundation.WFService;


namespace BPM.Base.WFLib
{
    //[ActivityValidator(typeof(TemplateValidator))]
    [Designer(typeof(WaitSubmitDesigner), typeof(IDesigner))]
    public class 状态机模板 : StateMachineWorkflowActivity, ITemplate
    {

        #region 1 基本信息

        string _模板编号="";

        //-[1.1 模板编号]
        [DescriptionAttribute("工作流模板的编号")]
        [CategoryAttribute("1.基本信息")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 模板编号
        {
            get
            {
                if (string.IsNullOrEmpty(_模板编号))
                {
                    return this.Name;
                }
                else
                {
                    return _模板编号;
                }
        
            }
            set
            {
               _模板编号=value;
            }

        }
        //--

        //-[1.2 模板名称]
        public static DependencyProperty 模板名称Property = DependencyProperty.Register("模板名称", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("工作流模板的名称")]
        [CategoryAttribute("1.基本信息")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 模板名称
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.模板名称Property)));
            }
            set
            {
                base.SetValue(状态机模板.模板名称Property, value);
            }
        }
        //--

        //-[1.3 模板说明]
        public static DependencyProperty 模板说明Property = DependencyProperty.Register("模板说明", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("工作流的模板说明")]
        [CategoryAttribute("1.基本信息")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 模板说明
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.模板说明Property)));
            }
            set
            {
                base.SetValue(状态机模板.模板说明Property, value);
            }
        }
        //--

        //-[1.4 扩展数据]
        public static DependencyProperty 扩展数据Property = DependencyProperty.Register("扩展数据", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("扩展数据")]
        [CategoryAttribute("1.基本信息")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 扩展数据
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.扩展数据Property)));
            }
            set
            {
                base.SetValue(状态机模板.扩展数据Property, value);
            }
        }
        //--



        //-[1.5 模板类型]


        [DescriptionAttribute("模板类型")]
        [CategoryAttribute("1.基本信息")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 模板类型
        {
            get
            {
                return "状态机";
            }
          
        }
        //--


        //-[1.6 模板版本]


        private string _模板版本 = "1.0.0.0";

        [DescriptionAttribute("模板版本")]
        [CategoryAttribute("1.基本信息")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 模板版本
        {
            get
            {
                return _模板版本;
            }
            set
            {
                _模板版本 = value;
            }
        }
        //--
        #endregion

        #region 2 表单配置

        //-[2.1 启动窗体]
        public static DependencyProperty 启动窗体Property = DependencyProperty.Register("启动窗体", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("启动窗体")]
        [CategoryAttribute("2.表单配置")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 启动窗体
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.启动窗体Property)));
            }
            set
            {
                base.SetValue(状态机模板.启动窗体Property, value);
            }
        }
        //--

        //-[2.2 数据表单列表]
        public static DependencyProperty 数据表单列表Property = DependencyProperty.Register("数据表单列表", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("在本次任务中要用到的所有表(或逻辑表)的名称列表格式:  'a, b, c'")]
        [CategoryAttribute("2.表单配置")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 数据表单列表
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.数据表单列表Property)));
            }
            set
            {
                base.SetValue(状态机模板.数据表单列表Property, value);
            }
        }
        //--

        //-[2.3 数据表单列表]
        public static DependencyProperty 启动时填写的表单Property = DependencyProperty.Register("启动时填写的表单", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("启动时填写的表单")]
        [CategoryAttribute("2.表单配置")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 启动时填写的表单
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.启动时填写的表单Property)));
            }
            set
            {
                base.SetValue(状态机模板.启动时填写的表单Property, value);
            }
        }
        //--
        #endregion

        #region 3 权限信息

        //-[3.1 管理部门]
        public static DependencyProperty 管理部门Property = DependencyProperty.Register("管理部门", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("可对流程进行管理的部门")]
        [CategoryAttribute("3.权限信息")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 管理部门
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.管理部门Property)));
            }
            set
            {
                base.SetValue(状态机模板.管理部门Property, value);
            }
        }
        //--

        //-[3.2 管理职能]
        public static DependencyProperty 管理职能Property = DependencyProperty.Register("管理职能", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("可对流程进行管理的职能格式:  'a, b, c'")]
        [CategoryAttribute("3.权限信息")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 管理职能
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.管理职能Property)));
            }
            set
            {
                base.SetValue(状态机模板.管理职能Property, value);
            }
        }
        //--

        //-[3.3 管理人员]
        public static DependencyProperty 管理人员Property = DependencyProperty.Register("管理人员", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("可对流程进行管理的人员格式:  'a, b, c'")]
        [CategoryAttribute("3.权限信息")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 管理人员
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.管理人员Property)));
            }
            set
            {
                base.SetValue(状态机模板.管理人员Property, value);
            }
        }
        //--

        //-[3.4 查看部门]
        public static DependencyProperty 查看部门Property = DependencyProperty.Register("查看部门", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("可对流程进行查看的部门")]
        [CategoryAttribute("3.权限信息")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 查看部门
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.查看部门Property)));
            }
            set
            {
                base.SetValue(状态机模板.查看部门Property, value);
            }
        }
        //--

        //-[3.5 查看职能]
        public static DependencyProperty 查看职能Property = DependencyProperty.Register("查看职能", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("可对流程进行查看的职能格式:  'a, b, c'")]
        [CategoryAttribute("3.权限信息")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 查看职能
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.查看职能Property)));
            }
            set
            {
                base.SetValue(状态机模板.查看职能Property, value);
            }
        }
        //--

        //-[3.6 查看人员]
        public static DependencyProperty 查看人员Property = DependencyProperty.Register("查看人员", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("string	可对流程进行查看的人员格式:  a, b, c")]
        [CategoryAttribute("3.权限信息")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 查看人员
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.查看人员Property)));
            }
            set
            {
                base.SetValue(状态机模板.查看人员Property, value);
            }
        }
        //--

        //-[3.7 启动人员特殊权限]
        private string _启动人员特殊权限 = "";
        [BrowsableAttribute(true)]
        [CategoryAttribute("3.权限信息")]
        [EditorAttribute(typeof(状态机模板_启动人员特殊权限), typeof(System.Drawing.Design.UITypeEditor))]
        public string 启动人员特殊权限
        {
            get
            {
                return _启动人员特殊权限;
            }

            set
            {
                _启动人员特殊权限 = value;
            }
        }
        //--

        //-[3.8 权限编号]
        public static DependencyProperty 权限编号Property = DependencyProperty.Register("权限编号", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("留做扩展")]
        [CategoryAttribute("3.权限信息")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 权限编号
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.权限编号Property)));
            }
            set
            {
                base.SetValue(状态机模板.权限编号Property, value);
            }
        }
        //--
        #endregion

        #region 4 时限

        //-[4.1 办理时限]
        public static DependencyProperty 办理时限Property = DependencyProperty.Register("办理时限", typeof(int), typeof(状态机模板), new PropertyMetadata(0));

        [DescriptionAttribute("流程启动后应在指定的工作日内完成格式: int  >  0")]
        [CategoryAttribute("4.时限")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public int 办理时限
        {
            get
            {
                return ((int)(base.GetValue(状态机模板.办理时限Property)));
            }
            set
            {
                base.SetValue(状态机模板.办理时限Property, value);
            }
        }
        //--

        //-[4.2 超时操作]
        public static DependencyProperty 超时操作Property = DependencyProperty.Register("超时操作", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("创建业务后, 办理时限超时后的默认操作")]
        [CategoryAttribute("4.时限")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 超时操作
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.超时操作Property)));
            }
            set
            {
                base.SetValue(状态机模板.超时操作Property, value);
            }
        }
        //--
        #endregion

        #region 5 业务信息(启动时)
        //-[5.1 业务类型]
        public static DependencyProperty 业务类型Property = DependencyProperty.Register("业务类型", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("工单或事项的类型")]
        [CategoryAttribute("5.业务信息(启动时)")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 业务类型
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.业务类型Property)));
            }
            set
            {
                base.SetValue(状态机模板.业务类型Property, value);
            }
        }
        //--

        //-[5.2 业务编号]
        public static DependencyProperty 业务编号Property = DependencyProperty.Register("业务编号", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("工单或事项的编号")]
        [CategoryAttribute("5.业务信息(启动时)")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 业务编号
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.业务编号Property)));
            }
            set
            {
                base.SetValue(状态机模板.业务编号Property, value);
            }
        }
        //--

        //-[5.3 主业务编号]
        public static DependencyProperty 主业务编号Property = DependencyProperty.Register("主业务编号", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("主工单或事项的编号")]
        [CategoryAttribute("5.业务信息(启动时)")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 主业务编号
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.主业务编号Property)));
            }
            set
            {
                base.SetValue(状态机模板.主业务编号Property, value);
            }
        }
        //--

        //-[5.4 业务名称]
        public static DependencyProperty 业务名称Property = DependencyProperty.Register("业务名称", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("工单或事项的名称")]
        [CategoryAttribute("5.业务信息(启动时)")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 业务名称
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.业务名称Property)));
            }
            set
            {
                base.SetValue(状态机模板.业务名称Property, value);
            }
        }
        //--

        //-[5.5 业务描述]
        public static DependencyProperty 业务描述Property = DependencyProperty.Register("业务描述", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("工单或事项的描述")]
        [CategoryAttribute("5.业务信息(启动时)")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 业务描述
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.业务描述Property)));
            }
            set
            {
                base.SetValue(状态机模板.业务描述Property, value);
            }
        }
        //--

        //-[5.6 业务紧急度]
        public static DependencyProperty 业务紧急度Property = DependencyProperty.Register("业务紧急度", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("业务紧急度")]
        [CategoryAttribute("5.业务信息(启动时)")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 业务紧急度
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.业务紧急度Property)));
            }
            set
            {
                base.SetValue(状态机模板.业务紧急度Property, value);
            }
        }
        //--

        //-[5.7 业务保密度]
        public static DependencyProperty 业务保密度Property = DependencyProperty.Register("业务保密度", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("业务保密度")]
        [CategoryAttribute("5.业务信息(启动时)")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 业务保密度
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.业务保密度Property)));
            }
            set
            {
                base.SetValue(状态机模板.业务保密度Property, value);
            }
        }
        //--

        //-[5.8 启动人员]
        public static DependencyProperty 启动人员Property = DependencyProperty.Register("启动人员", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("启动流程的人")]
        [CategoryAttribute("5.业务信息(启动时)")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 启动人员
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.启动人员Property)));
            }
            set
            {
                base.SetValue(状态机模板.启动人员Property, value);
            }
        }

        //--

        //-[5.9 启动部门]
        public static DependencyProperty 启动部门Property = DependencyProperty.Register("启动部门", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("启动流程的部门")]
        [CategoryAttribute("5.业务信息(启动时)")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 启动部门
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.启动部门Property)));
            }
            set
            {
                base.SetValue(状态机模板.启动部门Property, value);
            }
        }
        //--

        //-[5.10 启动职能]
        public static DependencyProperty 启动职能Property = DependencyProperty.Register("启动职能", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("启动流程的职能")]
        [CategoryAttribute("5.业务信息(启动时)")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 启动职能
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.启动职能Property)));
            }
            set
            {
                base.SetValue(状态机模板.启动职能Property, value);
            }
        }
        //--

        //-[5.11 启动时间]
        public static DependencyProperty 启动时间Property = DependencyProperty.Register("启动时间", typeof(DateTime), typeof(状态机模板), new PropertyMetadata(new DateTime(1900, 1, 1)));

        [DescriptionAttribute("启动流程的时间")]
        [CategoryAttribute("5.业务信息(启动时)")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public DateTime 启动时间
        {
            get
            {
                return ((DateTime)(base.GetValue(状态机模板.启动时间Property)));
            }
            set
            {
                base.SetValue(状态机模板.启动时间Property, value);
            }
        }
        //--
        #endregion

        #region 6 子流程
        //-[6.1 流程回归组]
        public static DependencyProperty 流程回归组Property = DependencyProperty.Register("流程回归组", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("流程回归组")]
        [CategoryAttribute("6.子流程")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 流程回归组
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.流程回归组Property)));
            }
            set
            {
                base.SetValue(状态机模板.流程回归组Property, value);
            }
        }
        //--

        //-[6.2 回归主流程]
        public static DependencyProperty 回归主流程Property = DependencyProperty.Register("回归主流程", typeof(bool), typeof(状态机模板));

        [DescriptionAttribute("回归主流程")]
        [CategoryAttribute("6.子流程")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public bool 回归主流程
        {
            get
            {
                return ((bool)(base.GetValue(状态机模板.回归主流程Property)));
            }
            set
            {
                base.SetValue(状态机模板.回归主流程Property, value);
            }
        }
        //--

        //-[6.3 主流程编号]
        public static DependencyProperty 主流程编号Property = DependencyProperty.Register("主流程编号", typeof(Guid), typeof(状态机模板), new PropertyMetadata(Guid.Empty));

        [DescriptionAttribute("主流程编号")]
        [CategoryAttribute("6.子流程")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public Guid 主流程编号
        {
            get
            {
                return ((Guid)(base.GetValue(状态机模板.主流程编号Property)));
            }
            set
            {
                base.SetValue(状态机模板.主流程编号Property, value);
            }
        }
        //--


        #endregion

        #region 7 数据中转
        //-[7.1 流程编号]


         Guid _流程编号 = Guid.Empty;
        [DescriptionAttribute("")]
        [CategoryAttribute("7.数据中转")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public Guid 流程编号
        {
            get
            {
                return _流程编号;
            }
            set
            {
                _流程编号 = value;
            }

        }
        //--

        //-[7.2 状态编号
        public static DependencyProperty 状态编号Property = DependencyProperty.Register("状态编号", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("中转数据用")]
        [CategoryAttribute("7.数据中转")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 状态编号
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.状态编号Property)));
            }
            set
            {
                base.SetValue(状态机模板.状态编号Property, value);
            }
        }
        //--

        //-[7.3 当前节点提交人员]
        public static DependencyProperty 当前节点提交人员Property = DependencyProperty.Register("当前节点提交人员", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("中转数据用")]
        [CategoryAttribute("7.数据中转")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 当前节点提交人员
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.当前节点提交人员Property)));
            }
            set
            {
                base.SetValue(状态机模板.当前节点提交人员Property, value);
            }
        }
        //--

        //-[7.4 当前节点提交结果]
        public static DependencyProperty 当前节点提交结果Property = DependencyProperty.Register("当前节点提交结果", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("中转数据用")]
        [CategoryAttribute("7.数据中转")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 当前节点提交结果
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.当前节点提交结果Property)));
            }
            set
            {
                base.SetValue(状态机模板.当前节点提交结果Property, value);
            }
        }
        //--

        //-[7.5 上下文数据]
        public static DependencyProperty 上下文数据Property = DependencyProperty.Register("上下文数据", typeof(object), typeof(状态机模板));

        [DescriptionAttribute("中转数据用")]
        [CategoryAttribute("7.数据中转")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public object 上下文数据
        {
            get
            {
                return ((object)(base.GetValue(状态机模板.上下文数据Property)));
            }
            set
            {
                base.SetValue(状态机模板.上下文数据Property, value);
            }
        }
        //--

        //-[7.6 据数据表单据]
        public static DependencyProperty 数据表单Property = DependencyProperty.Register("数据表单", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("中转数据用")]
        [CategoryAttribute("7.数据中转")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 数据表单
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.数据表单Property)));
            }
            set
            {
                base.SetValue(状态机模板.数据表单Property, value);
            }
        }
        //--

        //-[7.7 据数据表单据]
        public static DependencyProperty 下一状态办理人员Property = DependencyProperty.Register("下一状态办理人员", typeof(string), typeof(状态机模板), new PropertyMetadata(""));

        [DescriptionAttribute("中转数据用")]
        [CategoryAttribute("7.数据中转")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 下一状态办理人员
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.下一状态办理人员Property)));
            }
            set
            {
                base.SetValue(状态机模板.下一状态办理人员Property, value);
            }
        }
        //--

        public static DependencyProperty 下一状态接件部门Property = DependencyProperty.Register("下一状态接件部门", typeof(string), typeof(状态机模板), new PropertyMetadata(""));
        [DescriptionAttribute("中转数据用")]
        [CategoryAttribute("7.数据中转")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 下一状态接件部门
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.下一状态接件部门Property)));
            }
            set
            {
                base.SetValue(状态机模板.下一状态接件部门Property, value);
            }
        }

        public static DependencyProperty 下一状态接件职能Property = DependencyProperty.Register("下一状态接件职能", typeof(string), typeof(状态机模板), new PropertyMetadata(""));
        [DescriptionAttribute("中转数据用")]
        [CategoryAttribute("7.数据中转")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public string 下一状态接件职能
        {
            get
            {
                return ((string)(base.GetValue(状态机模板.下一状态接件职能Property)));
            }
            set
            {
                base.SetValue(状态机模板.下一状态接件职能Property, value);
            }
        }
        #endregion

        #region 8 调试测试
        //-[8.1 测试编号据]
        public static DependencyProperty 测试编号Property = DependencyProperty.Register("测试编号", typeof(int), typeof(状态机模板), new PropertyMetadata(0));

        [DescriptionAttribute("0表示正常流程")]
        [CategoryAttribute("8.调试测试")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public int 测试编号
        {
            get
            {
                return ((int)(base.GetValue(状态机模板.测试编号Property)));
            }
            set
            {
                base.SetValue(状态机模板.测试编号Property, value);
            }
        }
        //--

        //-[8.2 状态跟踪器据]
        public static DependencyProperty 状态跟踪器Property = DependencyProperty.Register("状态跟踪器", typeof(int), typeof(状态机模板), new PropertyMetadata(0));

        [DescriptionAttribute("中转数据用,调试用")]
        [CategoryAttribute("8.调试测试")]
        [BrowsableAttribute(true)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
        public int 状态跟踪器
        {
            get
            {
                return ((int)(base.GetValue(状态机模板.状态跟踪器Property)));
            }
            set
            {
                base.SetValue(状态机模板.状态跟踪器Property, value);
            }
        }
        //--
        #endregion

        protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)
        {


            //[1 状态跟踪器标识为1]
            this.状态跟踪器 = 1;

            //[2 为 流程编号 属性赋值 ]
            this.流程编号 = this.WorkflowInstanceId;

           
            //[end]
            return base.Execute(executionContext);
        }




    }
    
  
}
